<!doctype html>
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>我购买的商品 - 会员中心 - <?php echo $cfg_webname; ?></title>

<link href="/templets/nbbmobi/style/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="templets/style/base.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templets/js/j.js"></script>
<script type="text/javascript" src="templets/js/load.js"></script>
<script type="text/javascript" src="templets/js/leftmenu.js"></script>
<script type="text/javascript" src="templets/js/table_function.js"></script>
<script type="text/javascript">
	//获得选中文件的文件名
	function GetCheckfolderItem()
	{
		var allSel='';
		if(document.form1.deleteid.value) return document.form1.deleteid.value;
		for(i=0;i<document.form1.deleteid.length;i++)
		{
			if(document.form1.deleteid[i].checked)
			{
				if(allSel=='')
				allSel=document.form1.deleteid[i].value;
				else
				allSel=allSel+","+document.form1.deleteid[i].value;
			}
		}
		return allSel;
	}
	
	function DoSubmit()
	{
		var selid = GetCheckfolderItem();
		if(selid=='') {
			alert("你没选中任何信息！");
			return false;
		}
		if(window.confirm("你确定要删除这些消息么？"))
		{
			location = "shops_products.php?dopost=del&ids="+selid;
		}
	}
</script>
</head>
<body>
  <?php include(DEDEMEMBER."/templets/head.htm"); ?>
<div class="container-xl">
  <div class="row">
    <div class="col-12 bg-white">
      <div class="my-3">
		<a class="btn btn-primary btn-sm" href="mypay.php" id="buy">我购买的文章</a>
		<a class="btn btn-primary btn-sm" href="shops_orders.php">商品定单</a>
		<a class="btn btn-primary btn-sm" href="shops_products.php" id="buy">我购买的商品</a>
	 </div>
      <div>
        <h3 class="meTitle pb-3">购买的商品</h3>
        <?php if(!empty($oid)){ ?>
		<div class="table-responsive">
         <table class="table table-hover">
            <thead class="thead-light">
              <tr>
                <th colspan="2" ><strong>订单信息</strong></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>订单号：</td>
                <td><strong><?php echo $oid?></strong></td>
              </tr>
              <tr>
                <td>支付方式：</td>
                <td><?php echo GetSta($row['state'],$oid)?></td>
              </tr>
              <tr>
                <td>单价(元/单位)：</td>
                <td><?php echo $row['uprice']?>元</td>
              </tr>
               <tr>
                <td>数量：</td>
                <td><?php echo $row['cartcount']?></td>
              </tr>
              <tr>
                <td>配送：</td>
                <td><?echo $row['dname'];?> 费用:<?php echo $row['dprice']?>元</td>
              </tr>
              <tr>
                <td>总计：</td>
                <td><?php echo $row['priceCount']?>元</td>
              </tr>
              <tr>
                <td>发生时间：</td>
                <td><?php echo GetDateTimeMk($row['stime'])?></td>
              </tr>
              <tr>
                <td>收货人：</td>
                <td><?php echo $row['consignee']?></td>
              </tr>
              <tr>
                <td>地址：</td>
                <td><?php echo $row['address']?></td>
              </tr>
              <tr>
                <td>邮编：</td>
                <td><?php echo $row['zip']?></td>
              </tr>
              <tr>
                <td>联系电话：</td>
                <td><?php echo $row['tel']?></td>
              </tr>
              <tr>
                <td>邮箱：</td>
                <td><?php echo $row['email']?></td>
              </tr>
              <tr>
                <td>留言：</td>
                <td><?php echo $row['des']?></td>
              </tr>
            </tbody>
          </table>
		  </div>
          <?php }?>
		  <div class="table-responsive">
          <table class="table table-hover">
            <thead class="thead-light">
              <tr>
                <th>订单号</th>
                <th>商品名称</th>
                <th><span>单价(元/单位)</span></th>
                <th>数量</th>
                <th>购买时间</th>
              </tr>
            </thead>
            <form name='form1' action="shops_products.php" method="post">
            <input type='hidden' name='dopost' value='del' /> 
            <tbody>
            {dede:datalist}
            <tr>
              <td align="center"><input type="checkbox" name="deleteid" value="{dede:field.oid/}"/><a class="ml-2" href="shops_products.php?do=show&oid={dede:field.oid/}">{dede:field.oid/}</a></td>
              <td><a href="<?php echo $cfg_cmspath;?>/plus/view.php?aid={dede:field.aid/}" target="_blank">{dede:field.title/}</a></td>
              <td><strong>{dede:field.price/}</strong></td>
              <td>{dede:field.buynum/}</td>
              <td>{dede:field.oid function="carTime(@me)"/}</td>
            </tr>
            {/dede:datalist}
            <tr>
            <td colspan="6"><button id="checkedClick" type="button" class="greenBtn1">全选</button><button type="button" onclick="DoSubmit()" class="greenBtn3">删除选中</button></td></tr>
			</tbody>
            </form>
          <tfoot>
            <tr>
              <td colspan="6"><span class="d-md-none text-secondary">手机上可按住订单向左拖动查看全部</span><div class="pageList">{dede:pagelist listsize=5/}</div></td>
            </tr>
          </tfoot>
        </table>
      </div>
      </div>
      <!--主操作区域 -->
    </div>
  </div>
</div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>

</body>
</html>
